home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Ahoy 1986 December
/
Ahoy_Magazine_86-12_1986_Double_L.d64
/
Micro City
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-10-26
|
8KB
|
197 lines
5 poke56,48:poke52,48
10 poke53276,255:poke53277,255:poke53271,255:poke53285,8
90 ifpeek(2039)=68then5100
100 gosub800:poke53280,6:print" one moment please"
105 fort=12288to12927:readt2:poket,t2:next
110 gosub850:fort=192to200:fort2=0to60step3:fort3=0to2:t4=peek(t*64+t2+t3)
120 t5=(t4and3)*64+(t4and12)*4+(t4and48)/4+(t4and192)/64
130 poke(t+16)*64+t2+2-t3,t5:next:next:next
200 gosub870:poke56334,peek(56334)and254:poke1,peek(1)and251
205 fort=0to511:poke14336+t,peek(53248+t):next
210 fort=0to7:readt2:fort3=0to7:poke(35+t)*8+14336+t3,peek(53248+t2*8+t3)
215 next:next
220 poke1,peek(1)or4:poke56334,peek(56334)or1
230 poke2039,68:goto5100
800 poke53281,1:poke53280,2:poke53272,21:poke53265,27:poke53269,0
810 print"[147][167][205] [206][165][208][183] [206][183][205] [207][205] [206][183][205] [206][183][205] [208][183] [183][208][183][183] [205][206]"
820 print"[167] [205][206] [165][167] [165] [204][206] [165] [167] [165] [167] [167] [167]"
830 print"[167] [165][186][175] [205][175][206] [165][205] [205][175][206] [205][175][206] [186][175] [167] [167]"
840 return
850 print" can you save it?"
860 return
870 print"[151][144] written by"
880 print" darryl dion hawkins"
890 return
1000 rem ** player control **
1010 jy=peek(56320):onmogoto1110,1160
1020 if(jyand16)=0then1410
1030 on15-(jyand15)goto1310,1360,,1260,1260,1260,,1250,1250,1250
1040 poke2040,192:dk=0:sd=0:goto1290
1100 rem ** move right **
1110 x=x+sp:ifx>mx-8thenmo=2:an=an+1:goto1160
1120 hb=hborint(x/256):poke53248,xand255:poke53264,hb
1130 an=(an+1)and3:poke2040,192+an:goto1200
1150 rem ** move left **
1160 x=x-sp:ifx<24thenx=24:mo=0:goto1290
1170 hb=hband254orint(x/256):poke53248,xand255:poke53264,hb
1180 an=(an-1)and3:poke2040,192+an:goto1200
1200 on15-(jyand15)goto1310,1360
1210 goto1290
1250 mo=1:goto1110
1260 mo=2:goto1160
1290 ifh1>0thenh1=h1-1
1295 goto3030
1300 rem ** high punch **
1310 ifh1then1290
1315 poke2040,196:h1=2:an=0:ifx<mx-32ormd=1then1290
1320 gosub4100:p2=p2-2:goto1290
1350 rem ** low punch **
1360 ifh1then1290
1365 poke2040,197:h1=4:an=0:ifx<mx-32then1290
1370 ifma=0thenifmd=0thengosub4100:goto1290
1380 gosub4100:p2=p2-3:h2=h2+int(rnd(1)*2):goto1290
1400 rem ** duck **
1410 if(jyand2)=0andqd<8thenpoke2040,201:dk=1:sd=1:qd=qd+1:p1=p1+1:goto1290
1420 dk=1:poke2040,198:goto1290
2000 rem ** computer control **
2010 md=0:onm2goto2110
2020 ifmx>x+ms*4then2250
2030 onskgoto2560,2450,2500
2040 poke2041,208:md=0:goto2290
2100 rem ** move left **
2110 mx=mx-ms:ifmx<x+8thenm2=0:mx=mx+ms:goto2290
2120 hb=hband253or2*int(mx/256):poke53250,mxand255:poke53264,hb
2130 ma=(ma+1)and3:poke2041,208+ma:goto2290
2250 m2=1:goto2110
2290 ifh2>0thenh2=h2-1
2295 goto3050
2300 rem ** high punch **
2310 ifh2then2290
2315 poke2041,212:h2=2:ma=0:ifmx>x+32ordk=1then2290
2320 gosub4100:p1=p1-2:h1=h1+int(rnd(1)*2):goto2290
2350 rem ** low punch **
2360 ifh2then2290
2365 poke2041,213:h2=4:ma=0:ifmx>x+32orsd=1then2290
2370 ifan=0thenifdk=0thengosub4100:goto2290
2380 gosub4100:p1=p1-3:h1=h1+int(rnd(1)*3):goto2290
2400 rem ** duck **
2410 md=1:poke2041,214:goto2290
2450 ifmx>x+4then2480
2460 ifint(rnd(1)*3)=0then2410
2470 r=int(rnd(1)*2)+1:onrgoto2310,2360
2480 r=int(rnd(1)*7)+1:onrgoto2250,2250,2410,2310,2360
2490 goto2040
2500 ifmx>x+36then2540
2510 ifint(rnd(1)*6)=0then2410
2520 ifdk=0then2310
2530 goto2360
2540 r=int(rnd(1)*6)+1:onrgoto2250,2410,2410
2550 goto2040
2560 ifmx>x+4thenr=int(rnd(1)*5)+1:onrgoto2310,2360,2410,2040,2040
2570 r=int(rnd(1)*8)+1:onrgoto2250,2250,2250,2410,2310,2360
2580 goto2040
3000 rem ** main loop **
3010 forq=0to4
3020 goto1010
3030 ifp2<1then4010
3040 goto2010
3050 ifp1<1then4000
3060 ifmo=0thenifdk=0thenpoke2040,192
3070 ifm2=0thenifmd=0thenpoke2041,208
3080 ifan=0thenmo=0
3090 ifma=0thenm2=0
3100 ford=0to100:next:next:gosub3550
3110 goto3010
3300 rem ** display **
3310 poke53265,peek(53265)and239:poke2040,192:poke2041,208
3320 x=60:mx=280:hb=2:h1=0:h2=0:qd=0
3330 poke53248,x:poke53249,160:poke53250,mxand255:poke53251,160:poke53264,hb
3340 gosub7000
3350 poke53269,3:poke53265,peek(53265)and239or16:goto3010
3500 onscgoto3610,3620,3630,3640,3650,3670,3680,3690
3510 poke53280,6:poke53281,1:poke53272,21:poke53265,27:poke53269,0
3520 print"[147] [205][206] [206][183][205] [165] [167] [167] [165][208][183][167][205] [165]"
3530 print" [167] [165] [167] [165] [167] [167] [206][205] [165][167] [167] [205] [165]"
3540 print" [167] [205][175][206] [205][175][206] [167][206] [205][165][186][175][167] [205][165]"
3545 fort=0to3000:next:goto5100
3550 print"";sc,right$(" "+str$(p1),2),,
3555 printright$(" "+str$(p2),2)
3560 return
3610 sk=1:ms=8:p1=20:p2=25:goto3300
3620 sk=1:ms=12:p1=20:p2=30:goto3300
3630 sk=1:ms=12:p1=20:p2=35:goto3300
3640 sk=2:ms=8:p1=20:p2=25:goto3300
3650 sk=2:ms=12:p1=20:p2=25:goto3300
3660 sk=2:ms=12:p1=20:p2=30:goto3300
3670 sk=3:ms=8:p1=20:p2=20:goto3300
3680 sk=3:ms=12:p1=20:p2=25:goto3300
3690 sk=3:ms=12:p1=20:p2=30:goto3300
4000 poke2040,200:fort=0to2000:next:goto5100
4010 poke2041,216:fort=0to2000:next:sc=sc+1:goto3500
4100 poke54277,0:poke54278,240:poke54273,100:poke54296,15:poke54276,129
4110 poke54276,128:return
5000 rem
5010 jy=peek(56320):sc=-((jyand3)=3)-3*((jyand1)=0)-6*((jyand2)=0)
5020 sp=8:en=1:goto3500
5100 gosub800:print"[151] press fire button"
5110 fort=0to200:if(peek(56320)and16)=0then5010
5120 next:gosub850:fort=0to300:if(peek(56320)and16)=0then5010:next
5130 next:gosub870:fort=0to300:if(peek(56320)and16)=0then5010
5140 next:print"[147]":fort=0to750:next:goto5100
7000 poke53280,0:poke53281,11:poke53282,15
7005 poke53265,peek(53265)or64:poke53272,peek(53272)or14
7010 print"[147] &# &''''''[163][160][160][160]";
7015 print"''''*'''''''''''''''''''''''*''''''[163][160][160][160][160]";
7020 print"[149]''''*''''''''''[149]'''''''''''''*'''''[163][160][160][160][160][160]";
7025 print"[149]''''*''''''''''[149]'''''''''''''*''''[163][160][160][160][160][160][152][166]";
7030 print"[149]''''*''''''''''[149]'''''''''''''*'''[163][160][160][160][160][160][152][166]#";
7035 print"[149]''('*''''''''''[149]'''('''''''''*''[163][160][160][160][160][160][152][166]# ";
7040 print"[149]''''*''''''''''[149]'''''''''''''*'[163][160][160][160][160][160][152][166]# ";
7045 print"[149]''''*[163]'''''''''[149]'''''''''''''*[163][160][160][160][160][160][152][166]# ";
7050 print"[160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][152][166]# ";
7055 print"[160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][152][166]# ";
7060 print"[160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][152][166]# ";
7065 print"[152]'''''''''''''''''''''''''''''''*# ";
7070 return
8192 data 0,0,0,0,0,0,0,0,0,0,252,0,3,212,0,3
8208 data 84,0,3,84,0,0,80,0,6,169,16,22,169,16,22,169
8224 data 80,5,88,64,3,252,0,2,168,0,10,170,0,10,10,128
8240 data 40,2,160,40,0,160,160,2,128,224,2,128,60,3,240,0
8256 data 0,0,0,0,0,0,0,0,0,0,252,0,3,212,0,3
8272 data 84,0,3,84,0,0,80,0,6,169,16,22,169,16,22,169
8288 data 80,5,168,64,1,124,0,2,168,0,2,184,0,0,174,0
8304 data 0,46,0,0,174,0,3,184,0,0,248,0,0,63,0,0
8320 data 0,0,0,0,0,0,0,0,0,0,252,0,3,212,0,3
8336 data 84,0,3,84,0,0,80,0,6,169,16,22,169,16,22,169
8352 data 80,5,88,64,3,252,0,2,184,0,2,172,0,0,168,0
8368 data 2,234,0,10,138,0,42,2,128,56,2,128,15,3,240,0
8384 data 0,0,0,0,0,0,0,0,0,0,252,0,3,212,0,3
8400 data 84,0,3,84,0,0,80,0,6,169,16,22,169,16,22,169
8416 data 80,5,168,64,1,124,0,2,168,0,2,186,0,2,186,0
8432 data 0,174,0,15,172,0,15,160,0,12,160,0,0,252,0,0
8448 data 0,0,0,0,0,0,0,0,0,0,252,0,3,212,0,3
8464 data 84,1,3,84,21,0,81,84,0,149,64,2,148,0,6,168
8480 data 0,6,168,0,3,252,0,2,168,0,10,170,0,10,10,128
8496 data 42,2,160,40,0,160,168,2,128,224,2,128,60,3,240,0
8512 data 0,0,0,0,0,0,0,0,0,0,252,0,3,212,0,3
8528 data 84,0,3,84,0,0,80,0,0,148,0,2,149,80,6,169
8544 data 85,6,168,5,3,252,0,2,168,0,10,170,0,10,10,128
8560 data 42,2,160,40,0,160,168,2,128,224,2,128,60,3,240,0
8576 data 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
8592 data 0,0,0,0,0,0,0,0,0,252,0,3,212,0,3,84
8608 data 0,3,84,0,0,80,0,6,169,16,6,89,16,1,108,64
8624 data 3,250,128,2,170,160,2,128,160,234,128,160,250,0,252,0
8640 data 0,0,0,0,8,0,2,170,0,0,8,0,2,0,0,170
8656 data 128,0,2,0,32,0,10,168,0,0,32,0,0,0,0,0
8672 data 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
8688 data 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
8704 data 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
8720 data 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
8736 data 0,63,0,0,245,0,0,213,0,0,213,0,0,20,0,0
8752 data 168,10,0,154,42,128,155,170,128,30,162,128,26,131,240,0
8768 data 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
8784 data 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
8800 data 0,0,0,0,0,0,0,0,0,0,0,0,0,2,234,60
8816 data 10,233,95,10,229,87,2,182,23,234,133,0,250,1,80,0
9000 data105,95,223,233,160,209,229,234